from snowboy import SnowboyWakeup
from mainVoiceService import MainVoiceService

def main():
    # 初始化唤醒词监听
    def on_wakeup():
        # 唤醒词检测到后，调用mainVoiceService处理
        main_voice_service = MainVoiceService()
        main_voice_service.process()

        # 处理完成后，重新开始监听唤醒词
        wakeup.start()

    wakeup = SnowboyWakeup(model_path="resources/mimi.pmdl", callback=on_wakeup)
    wakeup.start()

if __name__ == "__main__":
    main()
